package com.mxpio.erp.common.equipment.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.mxpioframework.jpa.annotation.Generator;
import com.mxpioframework.security.annotation.Dict;
import com.mxpioframework.security.entity.BaseEntity;
import com.mxpioframework.security.entity.User;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

@Data
@EqualsAndHashCode(callSuper=false)
@Entity
@Table(name = "MB_ERP_EQUIPMENT_UPKEEP_TASK_PROGRESS")
@Schema(description="保养操作进度")
public class EquipmentUpkeepTaskProgress extends BaseEntity {

	/**主键*/
	@Id
	@Generator
	@Column(name = "ID_", updatable = false)
	@Schema(description = "主键")
	private String id;
	/**工单编码*/
	@Column(name = "BIZ_NO_")
	@Schema(description = "保养工单编码")
	private String bizNo;

	/**操作人*/
	@Column(name = "REPORTER_")
	@Schema(description = "上报人")
	@Dict(dicEntity = User.class, dicText = "nickname", dicCode = "username")
	private String reporter;

	@Column(name = "STATUS_")
	@Schema(description = "状态")
	@Dict(dicCode = "ERP_EQUIPMENT_UPKEEP_TASK_EXEC")//执行中1、搁置2、等件3、委外4
	private String status;

	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	@Column(name = "REPORT_TIME_")
	@Schema(description = "上报时间")
	private java.util.Date reportTime;

	@Column(name = "CONTENT_",columnDefinition = "TEXT")
	@Schema(description = "内容")
	private String content;
}
